package com.dss.auto_deploy.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class GitlabPushDto {
	private String user_avatar;
	private String user_email;
	private Integer total_commits_count;
	private String before;
	private String user_name;
	private String user_username;
	private String checkout_sha;
	private Project project;
	private Repository repository;
	private String object_kind;
	private String ref;
	private Integer user_id;
	private Integer project_id;
	private List<CommitsItem> commits;
	private String after;

	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	@Builder
	public static class CommitsItem{
		private List<String> removed;
		private List<String> added;
		private Author author;
		private List<String> modified;
		private String id;
		private String message;
		private String url;
		private String timestamp;
	}

	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	@Builder
	public static class Project{
		private String path_with_namespace;
		private String ssh_url;
		private String description;
		private String git_http_url;
		private String git_ssh_url;
		private String url;
		private String http_url;
		private String web_url;
		private Object avatar_url;
		private String name;
		private String namespace;
		private Integer visibility_level;
		private String default_branch;
		private Integer id;
		private String homepage;
	}

	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	@Builder
	public static class Repository{
		private String name;
		private String description;
		private Integer visibility_level;
		private String git_http_url;
		private String url;
		private String git_ssh_url;
		private String homepage;
	}
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	@Builder
	public static class Author{
		private String name;
		private String email;
	}


}